import faker
import pandas as pd

df = pd.read_excel('客户资料表.xlsx', names=['name', 'age', 'time', 'purpose', 'dress'])
print(df.columns)
print(df.infer_objects().dtypes)
print(df.head(10))
df.sort_values('age', inplace=True)
df.set_index('name', inplace=True)
lsit1 = []
# 迭代，使用name、Q1数据
for i, n, q in zip(df.index, df.time, df.dress):
    list2 = []
    list2.append(i)
    list2.append(n)
    list2.append(q)
    lsit1.append(list2)

print(lsit1)
# for index, col in df.iterrows():
#     print(col)

# for row in df.itertuples():
#     print(row.index)

for co in df:
    print(co)